undefined method 'label_tag'
Reported by celeretaudax | October 21st, 2008 @ 01:52 PM
In views/users/new.html.erb, usage of label_tag needs to be changed to label because of use inside of a form_for helper.
Recommended changes:
Sign up as a new user
<% @user.password = @user.password_confirmation = nil %>
<%= error_messages_for :user %> <% form_for :user, :url => users_path do |f| -%>
<%= f.label 'login' %>
<%= f.text_field :login %>
<%= f.label 'email' %>
<%= f.text_field :email %>
<%= f.label 'password' %>
<%= f.password_field :password %>
<%= f.label 'password_confirmation', 'Confirm Password' %>
<%= f.password_field :password_confirmation %>
<%= submit_tag 'Sign up' %>
<% end -%>Comments and changes to this ticket
-
celeretaudax October 21st, 2008 @ 01:58 PM
Also getting errors on label_tag usage in views/sessions/new.html.erb.
-
ronin-41023 (at lighthouseapp) December 16th, 2008 @ 12:52 PM
I was using rails 2.0.2 and got this same error. I upgraded to 2.2.2 and it works fine. The fix on your first post completely breaks the sign up form as well.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Restful Authentication Generator
This widely-used plugin provides a foundation for securely managing user
authentication:
* Login / logout
* Secure password handling
* Account activation by validating email
* Account approval / disabling by admin
* Rudimentary hooks for authorization and access control.
http://github.com/technoweenie/restful-authentication/tree